home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
EnigmA Amiga Run 1997 May
/
EnigmA AMIGA RUN 18 (1997)(G.R. Edizioni)(IT)[!][issue 1997-05][EAR-CD II].iso
/
earcd
/
dev
/
c
/
c_v43_dt.rea
< prev
next >
Wrap
Text File
|
1997-03-02
|
8KB
|
177 lines
Short: How: OS3 V40/43 PicDatatype in 100% C
Author: Andreas_Kleinert@t-online.de
Uploader: Andreas_Kleinert@t-online.de
Type: dev/c
samplePNM.datatype and source-code V43.5 (25.1.97)
(C) 1996-97 by Andreas R. Kleinert. All rights reserved.
---
This small sample datatype source code demonstrates, how to completely
write an Amiga OS 3 datatype (V40/V43) without any assembler stubs
or compiler/linker tricks in PURE C source code (currently SAS/C-based:
see Aminet:dev/c/CLib37x.LHA on how to adjust for some other compilers).
You may e.g. use this example source code to write more portable
Amiga OS 3 datatypes to allow easier porting of these
to other Amiga OS-derived operating systems, or the native
OS of an upcoming PowerPC Amiga.
Translate your 68k-assembler datatype startup-codes smartly
to C by simply using this source-code as an advice how to do it.
As a common case, a datatype of class picture, supporting
PNM-PGM (P5) and PNM-PPM (P6) has been used as an example.
With picture.datatype V40-42 only PGM is supported,
and with picture.datatype V43 reading of PPM is offered as well,
while encountering an PGM file under V43 causes a fallback to V40
routines (could have been done differently, but was not necessary
here just for demonstration).
For testing this datatype, simply use a tool from the NetPBM package
(or maybe for example a tool supporting superview.library) and save
a graphics in the binary PGM or PPM format (P5/P6 of the PNM series).
Then install this datatype and try loading the file via MultiView.
Should work fine.
---
Feel free to use this source for own projects.
It is allowed to be spread and distributed anywhere, as far
as my consent is concerned.
Amiga Technologies, or the current owner of the technologie,
is allowed to always put this source on their newest
Developer CD-ROM.
Thanks and credits will always be appreciated - for example,
you MAY, but NEED NOT:
give me credits in your program's docs, send me keyfiles for
your programs using the library, and so on.
But that's simply voluntarily.
This work was only roughly inspired by David Junod's original
example source codes for datatypes.
_________________________________________________________
| You may reach me the following way. |
| Send bug-reports, money or whatever to: |
|---------------------------------------------------------|
| * SuperView Development & Registration * |
| * DRAFU Development & Registration * |
| * Image Engineer Registration Site Europe * |
| |
| |
| PerSuaSiVe SoftWorX |
| |
| Andreas R. Kleinert |
| Sandstrasse 1 |
| D-57072 Siegen |
| Germany, Europe |
| |
| Any snail mail to the old address will still be routed. |
| |
| Phone: +49-271-22869 also FAX + AM |
| +49-271-22838 |
| |
| Weekdays after 17.00h. |
| |
| When calling via phone you may leave a message, |
| if I'm not available - but don't expect me |
| calling back to USA, Australia, ... since |
| german phone rates are HIGHLY expensive. |
|_________________________________________________________|
http://home.t-online.de/home/Andreas_Kleinert/
eMail:
Please send binaries via ARK@COB.wwbnet.de, and keep
them smaller than 16 KB. Please think twice before
sending them - my postbox is not unlimited in size.
- Fido Andreas Kleinert 2:2457/350.18
- Usenet
Andreas_Kleinert@superview.ftn.sub.org (Fido-Gate)
Andreas_Kleinert@t-online.de (T-Online)
ARK@COB.wwbnet.de (Z-Netz)
ARK@amigaworld.com (AmigaWorld)
- If nothing else works, try one of these public
Fido-Usenet gateways:
In Germany:
Andreas_Kleinert@p18.f350.n2457.z2.fido.sub.org
From USA or elsewhere:
Andreas_Kleinert@p18.f350.n2457.z2.fidonet.org
Please note, that the "superview.ftn.sub.org"
domain will perhaps be renamed soon
History:
V43.5 (25.1.97) : - now explicitely checks for DTA_SourceType == DTST_File
- small changes
- updated email information
V43.4 (3.1.97) : - fixed PRI entry in resident part
- slightly changed SCOPTIONS
- fixed some style things (APTR and library casts)
- fixed a bug: bitmap would not have been freed
on temporary-buffer allocation error
- added note about library opening to L_OpenLibs()
V43.3 (30.11.96) : - added SAS/C specific Ctrl-C disabling code
- made some workarounds compiler sensitive
- redone all with SAS/C V6.57
V43.2 (3.11.96) : - there was a FreeBitMap() call missing (oops)
- it's samplePNM.dt, not samplePNG.dt ;-)
V43.1 (25.10.96) : - added picture datatype V43 support
- thus added support for 24 Bit PPM (P6),
since PGM only has 256 grayscales
- thus renamed to samplePNM.datatype
V40.3 (13.9.96) : - fixed more "style" things
V40.2 (5.9.96) : - fixed some "style" things
V40.1 (2.9.96) : - first release
---
All mentioned trademarks are subjects to their owners.
============================= Archive contents =============================
Original Packed Ratio Date Time Name
-------- ------- ----- --------- -------- -------------
86 76 11.6% 25-Oct-96 16:26:52 +PGM
467 279 40.2% 25-Oct-96 16:26:52 +PGM.info
86 76 11.6% 25-Oct-96 16:27:44 +PPM
467 279 40.2% 25-Oct-96 16:27:44 +PPM.info
107 102 4.6% 25-Oct-96 17:34:40 +CompileNote.readme
739 301 59.2% 25-Oct-96 16:17:50 +libfuncs.h
835 388 53.5% 25-Oct-96 16:28:52 +samplePNM.datatype.info
245 174 28.9% 25-Oct-96 17:35:00 +SCOPTIONS
408 156 61.7% 25-Oct-96 16:23:58 +smakefile
119 104 12.6% 25-Oct-96 16:23:58 +smakefile.wth
3947 1178 70.1% 30-Nov-96 13:34:44 +StartUp.c
1100 578 47.4% 30-Nov-96 13:35:12 +StartUp.o
795 364 54.2% 03-Jan-97 15:21:22 +classbase.h
4728 2443 48.3% 25-Jan-97 14:01:18 +samplePNM.datatype
11773 2912 75.2% 25-Jan-97 13:59:24 +libfuncs.c
3500 1914 45.3% 25-Jan-97 14:01:16 +libfuncs.o
4782 1435 69.9% 25-Jan-97 14:00:50 +LibInit.c
1476 810 45.1% 25-Jan-97 14:01:04 +LibInit.o
4728 2443 48.3% 25-Jan-97 14:01:18 +samplePNM.datatype
6118 2417 60.4% 25-Jan-97 14:02:26 +README
-------- ------- ----- --------- --------
46506 18429 60.3% 27-Jan-97 01:16:02 20 files